import axios from '@/api/fetch';
import SERVER from '@/api/server';
import { status } from 'nprogress';

// 实销信息查询

// GET 查询列表 /vsSalesReport/searchReportForFactory
export const queryList = (params) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetailAlteration/alterationInfoQueryList`, params)
export const monthQueryList = (params) => axios.post(`${SERVER.RETAIL}/vsSalesReport/searchReportForSalesMonth`, params)

// GET 导出 /vsSalesReport/searchReportForFactoryExcel
export const exportExcel = (params) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/excel`, params, {
  responseType: 'blob'
});

// export const exportExcel = (params) => axios.get(`${SERVER.RETAIL}/vsSalesReport/searchReportForFactoryExcel`, {
//   params,
//   responseType: 'arraybuffer'
// })

// GET 查询详情  /vsSalesReport/searchRetailOrderReportDataById
export const getInfoById = params =>
  axios.get(`${SERVER.WHOLESALES}/actualSalesDetailAlteration/detailQuery?actualSalesId=${params.actualSalesId}&auditId=${params.auditId}&isSignboard=${params.isSignboard}`);


// GET 查询详情  /vsSalesReport/searchRetailOrderReportDataById
export const audit = (params) => axios.post(`${SERVER.WHOLESALES}/actualSalesDetail/updateStatus`,params)

// 零售订单维护	查询销售顾问	sysmanage	 /employeeNew/getEmployees	get
export const getEmployees = (params) => axios.get(`${SERVER.SYSMANAGE}/employeeNew/getEmployees`, {
  params
});


// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

